@{
    Layout = null;
}
@model Product;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CreateOrEdit</title>
    <style>
        #add{
            width: 300px;
            padding: 0px 5px 10px 15px;
            border: 1px solid;
        }
    </style>
</head>
<body>
    <div id="add">
        <table>
            @if (Model==null)
            {
                 <tr>
               <td>Id:</td>
               <td><input type="text" id="id"></td>
           </tr>
           <tr>
            <td>商品名称:</td>
            <td><input type="text" id="productname"></td>
        </tr>
        <tr>
            <td>供应商名称:</td>
            <td><input type="text" id="supplier"></td>
        </tr>
        <tr>
            <td>价格:</td>
            <td><input type="text" id="price"></td>
        </tr>
        <tr>
            <td>库存数量:</td>
            <td><input type="text" id="stock"></td>
        </tr>

            }else
            {
                 <tr>
               <td>Id:</td>
               <td><input type="text" id="id" value="@Model.Id"></td>
           </tr>
           <tr>
            <td>商品名称:</td>
            <td><input type="text" id="productname" value="@Model.ProductName"></td>
        </tr>
        <tr>
            <td>供应商名称:</td>
            <td><input type="text" id="supplier" value="@Model.Supplier"></td>
        </tr>
        <tr>
            <td>价格:</td>
            <td><input type="text" id="price" value="@Model.Price"></td>
        </tr>
        <tr>
            <td>库存数量:</td>
            <td><input type="text" id="stock" value="@Model.Stock"></td>
        </tr>
        <tr>
            <input type="button" value="保存" id="btnSave">
            <td><input type="button" value="取消" id="btnCancel"></td>

        </tr>

            }
          
        </table>
    </div>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/js/base.js"></script>
    
    
</body>
</html>